/** @format */

export function sleep(time: number) {
  return new Promise(resolve => setTimeout(resolve, time))
}

export function generateCodeTypeWithMsg(codeType: ICodeType, message: string): ICodeType {
  return Object.assign({}, codeType, { defaultMsg: message })
}
